package com.o2o.dao;

import com.o2o.entity.UserAwardMap;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * package_name:com.o2o.dao
 * Author:徐亚远
 * Date:2020/1/7 15:55
 * 项目名:com.o2o
 * Desription:
 **/
public interface UserAwardMapDao {
    /*
    * 根据传入进来的查询条件分页返回用户兑换奖品记录的列表信息
    * @param userAwardCondition
    * @param rowIndex
    * @param pageSize
    * @return
    * */
    List<UserAwardMap> queryUserAwardMapList(@Param("userAwardCondition") UserAwardMap userAwardCondition,@Param
            ("rowIndex")int rowIndex,@Param("pageSize")int pageSize);
    /*
    * 配合queryUseAwardMapList返回相同查询条件下的兑换奖品记录数
    * @param userAwardCondition
    * @return
    * */
    int queryUserAwardMapCount(@Param("userAwardCondition")UserAwardMap userAwardCondition);
    /*
    * 根据userAwardId返回某奖品兑换信息
    * @param userAwardId
    * @return
    * */
    UserAwardMap queryUserAwardMapById(long userAwardId);
    /*
    * 添加一条奖品兑换信息
    * @param userAwardMap
    * @return
    * */
    int insertUserAwardMap(UserAwardMap userAwardMap);
    /*
    * 更新奖品兑换信息,主要更新奖品领取状态
    * @param userAwardMap
    * @return
    * */
    int updateUserAwardMap(UserAwardMap userAwardMap);
}
